<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>

        function Person() { }

        const p1 = new Person();
        // console.log(Object.getPrototypeOf(p1));

        // Object.entries()  获取所有的对象键值，变成数组
        var obj = {
            name: "迪丽热巴",
            age: 20,
            address: '新疆'
        };

        // console.log(Object.entries(obj));

        // Object.fromEntries()
        var arr = [
            ['goodsName', '商品名称'],
            ['goodsCount', '商品数量'],
            ['goodsPrice', '商品价格'],
        ];

        console.log(Object.fromEntries(arr));


    </script>
</body>

</html>